<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org"
      xmlns:shiro="http://www.thymeleaf.org/thymeleaf-extras-shiro">

<!--头部导航栏-->
<nav class="navbar navbar-expand-lg bg-white fixed-top" th:fragment="topBar">
    <a class="navbar-brand" th:href="@{/product/queryAll}">Supermarket</a>
    <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarSupportedContent"
            aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
        <span class="navbar-toggler-icon"></span>
    </button>
    <div class="collapse navbar-collapse " id="navbarSupportedContent">
        <ul class="navbar-nav ml-auto navbar-right-top">
            <li class="nav-item dropdown nav-user">
                <a class="nav-link nav-user-img" href="#" id="navbarDropdownMenuLink2" data-toggle="dropdown"
                   aria-haspopup="true" aria-expanded="false"><img th:src="@{/images/avatar-1.jpg}" alt=""
                                                                   class="user-avatar-md rounded-circle"></a>
                <div class="dropdown-menu dropdown-menu-right nav-user-dropdown"
                     aria-labelledby="navbarDropdownMenuLink2">
                    <div class="nav-user-info">
                        <h5 class="mb-0 text-white nav-user-name">
                            <span th:text="${session.loginUser}"></span>
                            ，你好</h5>
                    </div>
                    <a class="dropdown-item" href="#"><i class="fas fa-user mr-2"></i>Account</a>
                    <a class="dropdown-item" th:href="@{/toUpdateUser}"><i class="fas fa-cog mr-2"></i>修改</a>
                    <a class="dropdown-item" th:href="@{/logout}"><i class="fas fa-power-off mr-2"></i>注销</a>
                </div>
            </li>
        </ul>
    </div>
</nav>
<!--侧边栏-->
<nav class="navbar navbar-expand-lg navbar-light" th:fragment="sideBar">
    <div class="collapse navbar-collapse" id="navbarNav">
        <ul class="navbar-nav flex-column">
            <li class="nav-item" shiro:hasPermission="user:salesman">
                <a class="nav-link" th:href="@{/product/queryAll}"> <i class="fa fa-fw fa-shopping-basket"></i>商品查询</a>
            </li>
            <li class="nav-item" shiro:hasPermission="user:salesman">
                <a class="nav-link" th:href="@{/shopping/queryAll}"><i class="fas fa-money-bill-alt "></i>收银业务</a>
            </li>
            <li class="nav-item" shiro:hasPermission="user:salesman">
                <a class="nav-link" th:href="@{/vip/queryAll}"><i class="fas fa-address-card"></i>会员管理</a>
            </li>
            <li class="nav-item" shiro:hasPermission="user:administrator">
                <a class="nav-link" th:href="@{/selltable/queryAll}"><i class="fas fa-calculator"></i>销售信息</a>
            </li>
            <li class="nav-item" shiro:hasPermission="user:administrator">
                <a class="nav-link" th:href="@{/user/queryAll}"><i class="fas fa-users"></i>人员管理</a>
            </li>
            <li class="nav-item" shiro:hasPermission="user:administrator">
                <a class="nav-link" th:href="@{/product/queryStock}"><i class="fas fa-shopping-bag"></i>商品管理</a>
            </li>
            <li class="nav-item" shiro:hasPermission="user:administrator">
                <a class="nav-link" th:href="@{/import/queryAll}"><i class="fas fa-warehouse"></i>入库记录</a>
            </li>
            <li class="nav-item" shiro:hasPermission="user:administrator">
                <a class="nav-link" th:href="@{/online/queryAll}"><i class="fas fa-shekel-sign"></i>上架记录</a>
            </li>
            <li class="nav-item" shiro:hasPermission="user:administrator">
                <a class="nav-link" th:href="@{/scrap/queryAll}"><i class="fas fa-shopping-bag"></i>报废记录</a>
            </li>
            <li class="nav-item" shiro:hasPermission="user:administrator">
                <a class="nav-link" th:href="@{/statistics/queryClass}"><i class="fas fa-fw fa-font"></i>财务统计</a>
            </li>

        </ul>
    </div>
</nav>

<!--尾部-->
<nav th:fragment="footer">
    <div class="row" >
        <div class="col-xl-6 col-lg-6 col-md-12 col-sm-12 col-12" style="text-align: center ; margin: auto ">
            Copyright © 2023/03/25 Concept. 小型超市收银系统--梅芙雨(史恩典)Vanessa.
        </div>
    </div>
</nav>

</html>